package com.zy.dp.strategy.example3;

public class PaymentContext
{

	private String name = null;

	private double money = 0.0;
	private PaymentStrategy strategy = null;

	public PaymentContext(String name, double money, PaymentStrategy strategy)
	{

		this.name = name;
		this.money = money;
		this.strategy = strategy;
	}

	public String getName()
	{
		return name;
	}

	public double getMoney()
	{
		return money;
	}

	public void payNow()
	{

		this.strategy.pay(this);

	}

}
